A database may provide a file repository that can be accessed via a variety of file system-based interfaces, such as those utilizing HTTP/WebDAV (Web Distributed Authoring and Versioning) or NFS (Network File System). Through such interfaces to the repository, a file is located, for example, via its URL or path and the repository is exposed as a hierarchical set of files and folders (e.g., directories). Further, data-oriented access mechanisms can be used to access a file repository, which expose the repository as a flat set of files that can be queried based on file content or attributes.
Files can be versioned, for example, in order to keep a record of changes to files, to provide the option to revert to an older version of a file, and to get information on who made each change to a file and the progression of changes to the file. Thus, a version-controlled file is one whose versions are tracked by the repository. When several users are working collaboratively on a set of files organized in a folder hierarchy, the users need to be isolated from each other's in-progress changes. For example, user U1 may be working on a project that needs to change files f1 and f2, and user U2 may need to use these files while working on another project. However, until U1 has completed changes to f1 and f2, U2 should see only the older versions of both files. Thus, a versioned repository allows users to checkout files, possibly update the files, and check the files in once the updates are completed. In this scenario, U2 does not want to see U1's checked-out versions of files. Because each version may need to be indexed and accessed as a separate entity, one approach is to store each version in a separate row of a table, which is referred to herein as a resource table.
Traditional versioning systems provide isolation using workspaces, an abstraction used to identify and maintain separate folder hierarchies for different users so that multiple users can work in isolation on a set of resources. An extension to WebDAV, referred to as “DeltaV,” is a network protocol that provides facilities for remote versioning and configuration management of documents stored on Web servers, which often interface with a file system-like repository for content management purposes. DeltaV is described in “DeltaV: Adding Versioning to the Web; WWW10 Tutorial Notes” (referred to herein as “the DeltaV reference”) available from the WebDAV.org organization; the entire contents of which is incorporated by this reference for all purposes as if fully disclosed herein.
A workspace is essentially a copy of a set of resources, e.g., files, in which a user can work in isolation from other users, where users' interactions are in the form of branches in the version histories of version-controlled resources. Thus, each workspace typically contains one version-controlled resource corresponding to each version-history for a resource associated with, or “in”, the workspace. The version that one workspace's version-controlled resource points to may be different from the version pointed to by a version-controlled resource of the same version-history in another workspace, thus achieving isolation. However, a given version (generally, one that does not contain in-progress changes) may be used by several workspaces.
When users perform queries in a particular workspace, the users expect only version rows that are in that particular workspace to be selected from the resource table. Thus, as referred to herein, a “workspace-local” query is a query which, when executed, selects only versions that are associated with the particular workspace in which the user is working. Workspace-local queries are especially important in the context of data-oriented repository queries, but are applicable to any data container that stores versions of resources or portions of such versions (i.e., generally, a table that stores at least a portion of the content of a version), and supports workspaces, e.g., a “workspace-enabled” database table. Supporting workspace-local queries in an efficient manner, while maintaining the required isolation among workspaces, poses certain challenges. Further, because there can be a large number of user workspaces associated with a given repository, a good approach to enabling workspace-local queries should have minimal overhead so that it can scale well.
In view of the foregoing, there is a need for efficient support for workspace-local queries in a repository that supports versioning of resources in the repository.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.